
import { RouteRecordRaw } from 'vue-router';
/**
 * 定义404、401界面
 * @link 参考：https://next.router.vuejs.org/zh/guide/essentials/history-mode.html#netlify
 */
export const notFoundAndNoPower = [
	{
		path: '/:path(.*)*',
		name: 'notFound',
		component: () => import('@/views/error/404.vue'),
		meta: {
			title: 'message.staticRoutes.notFound',
			isHide: true,
		},
	},
	{
		path: '/401',
		name: 'noPower',
		component: () => import('@/views/error/401.vue'),
		meta: {
			title: 'message.staticRoutes.noPower',
			isHide: true,
		},
	}
];


/**
 * 定义静态路由（默认路由）
 * 此路由不要动，前端添加路由的话，请在 `dynamicRoutes 数组` 中添加
 * @description 前端控制直接改 dynamicRoutes 中的路由，后端控制不需要修改，请求接口路由数据时，会覆盖 dynamicRoutes 第一个顶级 children 的内容（全屏，不包含 layout 中的路由出口）
 * @returns 返回路由菜单数据
 */
export const staticRoutes: Array<RouteRecordRaw> = [
	{
		path: '/',
		name: 'layout',
		redirect: '/roleManage',
		meta: {
			requiresAuth: true,
		},
		component: () => import('@/layout/index.vue'),
		children: [
			{
				path: '/achievements',
				name: 'achievements',
				component: () => import('@/views/teamManage/achievements.vue'),
				meta: { keepAlive: true }
			},
			{
				path: '/workbench',
				name: 'workbench',
				component: () => import('@/views/workbench/index.vue'),
				meta: { keepAlive: true }
			},
			{
				path: '/roleManage',
				name: 'roleManage',
				component: () => import('@/views/teamManage/roleManage.vue'),
				meta: { keepAlive: true }
			},
			{
				path: '/department',
				name: 'department',
				component: () => import('@/views/teamManage/department.vue'),
				meta: { keepAlive: true }
			},
			
			{
				path: '/shopLibrary',
				name: 'shopLibrary',
				component: () => import('@/views/shopManage/shopLibrary.vue'),
				meta: { keepAlive: true }
			},
			{
				path: '/sample',
				name: 'sample',
				component: () => import('@/views/sample/list.vue'),
				meta: { keepAlive: true }
			},
			{
				path: '/tpes',
				name: 'tpes',
				component: () => import('@/views/teamManage/tpes.vue'),
				meta: { keepAlive: true }
			},
	
		]
	},
	
	{
		path: '/login',
		name: 'Login',
		component: () => import('@/views/login/index.vue'),
		meta: {
			title: '登录',
		},
	},

	
];
